use core::ops::Deref;
use stm32f4::stm32f407::{self, dma1, dma2};

pub struct DMA1;
pub struct DMA2;

impl Deref for DMA1 {
    type Target = dma1::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*stm32f407::DMA1::PTR }
    }
}

impl Deref for DMA2 {
    type Target = dma2::RegisterBlock;
    fn deref(&self) -> &Self::Target {
        unsafe { &*stm32f407::DMA2::PTR }
    }
}

